package com.hhs.storage.bean;

import com.hhs.storage.util.SysUtil;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author hhs
 * @since 2022-12-07
 */
@Data
public class Comsumer implements Serializable {

    private static final long serialVersionUID = 1L;
    /**
     * 一般
     */
    private static final Integer LEVEL_GENERAL = 0;
    /**
     * 良好
     */
    private static final Integer LEVEL_GOOD = 1;
    /**
     * 优秀
     */
    private static final Integer LEVEL_EXCELLENT = 2;

    private String id;

    /**
     * 公司名称
     */
    private String name;

    /**
     * 联系方式
     */
    private String phone;

    /**
     * 业务对接人
     */
    private String principal;
    /**
     * 备注
     */
    private String remark;
    /**
     * 级别 0-一般 1-良好 2-优秀
     */
    private Integer level;
    /**
     * 级别 0-5颗星
     */
    private Integer star;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    private String createrId;

    private String contacts;

    public String getLevelName(){
        return SysUtil.COMSUMER_LEVEL_MAP.get(this.level);
    }

}
